//
//  HCBottomTableViewCell.m
//  HappyChildren
//
//  Created by WillyZhao on 2016/12/30.
//  Copyright © 2016年 WillyZhao. All rights reserved.
//

#import "HCBottomTableViewCell.h"
#import "HCAppointmentModel.h"

@implementation HCBottomTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.lineView.backgroundColor = YBKRGBCOLOR(241, 241, 241, 1);
    self.contentView.backgroundColor = YBKRGBCOLOR(242, 242, 242, 1);
    // Initialization code
}

-(void)cellModel:(id)model {
    HCAppointmentData *data = (HCAppointmentData *)model;
    
//    [self.headIMG sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",data.logo]]];
    
    [self.headIMG sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",data.logo]] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        self.headIMG.image = image;
    }];
    
    self.title.text = data.name;
    
    self.distance.text = [NSString stringWithFormat:@"%.2fkm",[data.distance floatValue]/1000.0];
    
    
    self.tel.text = data.time;
        
    self.starView.scorePercent = [data.star floatValue]/5.0;
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
